package org.kukker;

import org.kukker.R;

import android.app.Activity;
import android.app.Dialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentReceiver;
import android.location.LocationManager;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Telephony;
import android.sax.StartElementListener;
import android.telephony.gsm.SmsManager;
import android.telephony.gsm.SmsMessage;
import android.util.Log;

import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnKeyListener;
import android.widget.*;

public class CallIntentReceiver extends IntentReceiver{
	private String id = "Kukker";
	

	@Override
	public void onReceiveIntent(Context context, Intent intent) {
		try{
			String name = intent.getAction();
			Log.i("Kukker","onReceiveIntent: Name:"+name);
			
			/*
			Bundle bundle = intent.getBundleExtra("info");		
			int chain = bundle.getInt("chain");
			int ttl = bundle.getInt("ttl");
			
			String extra = bundle.getString("org.kubus.kubus.intent.POKE.extra");
			String chainInfo = "chain="+chain+":ttl="+ttl+":extra="+extra;
			String actionInfo = "action="+intent.getAction();
			*/
			
			
			//Toast.makeText(context, id+":"+intent.getAction(), Toast.LENGTH_SHORT).show();
			
			/*
			try{
				//String cn = cp.getClassName();
				//Toast.makeText(context, id+":className="+cp.getClassName(), Toast.LENGTH_SHORT).show();
			}catch(Exception e){
				Toast.makeText(context, "error:"+e.getMessage(), Toast.LENGTH_SHORT).show();
				
			}
			*/
			
		}
		catch(Exception e){
			Toast.makeText(context,"Error="+e.getMessage(), Toast.LENGTH_SHORT).show();
			Log.e(id,e.getMessage());
		}
	} 
  
    
}